#define _CRT_SECURE_NO_WARNINGS 1

#include"BSTree.h"

void Test1()
{
	vector<int> arr { 8, 3, 1, 10, 6, 4, 7, 14, 13 };
	yws::BSTree<int> t1;
	for (auto e : arr)
	{
		t1.InsertR(e);
	}
	t1.Inorder();

	/*t1.Erase(4);
	t1.Inorder();

	t1.Erase(14);
	t1.Inorder();

	t1.Erase(8);
	t1.Inorder();*/

	t1.EraseR(3);
	t1.Inorder();

	for (auto e : arr)
	{
		t1.EraseR(e);
		t1.Inorder();
	}
}

int main()
{
	Test1();
	return 0;
}

